input[su][type="checkbox"],
input[su][type="radio"] {
    display: none;
}

input[su][type="checkbox"]+span,
input[su][type="radio"]+span {
    line-height: 1em;
    text-indent: 1.2em;
    width: 1em;
    height: 1em;
    margin: 0.2em 0.1em;
    border: 2px solid #555;
    border-radius: var(--rad);
    padding: 0px;
    display: inline-block;
    position: relative;
    cursor: pointer;
}

input[su][type="radio"]+span {
    border-radius: 1em;
}

input[su][type="checkbox"]:checked+span,
input[su][type="radio"]:checked+span {
    border-color: var(--Primary);
}

input[su][type="checkbox"]:checked+span:after {
    content: '';
    display: block;
    width: 0.7em;
    height: 0.3em;
    margin: 0;
    top: 0;
    left: 0;
    transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    position: absolute;
    border-left: 0.15em solid rgb(238, 238, 238);
    border-bottom: 0.15em solid rgb(238, 238, 238);
}

input[su][type="radio"]:checked+span {
    background: var(--Primary);
    box-shadow: 0 0 0 3px rgb(238, 238, 238) inset;
}

input[su][type="checkbox"]+span:before,
input[su][type="radio"]+span:before {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 100%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    height: 4em;
    width: 4em;
    z-index: -1;
    -webkit-transition: all 0.5s cubic-bezier(0.23, 0.95, 0.56, 1);
    transition: all 0.5s cubic-bezier(0.23, 0.95, 0.56, 1);
}

input[su][type="checkbox"]+span:active::before,
input[su][type="radio"]+span:active::before {
    width: 0;
    height: 0;
    border-radius: 100%;
    background-color: var(--Primary);
    -webkit-transition: all 0.01s ease-out;
    transition: all 0.01s ease-out;
}

input[su][type="checkbox"]:checked+span:active::before,
input[su][type="radio"]:checked+span:active::before {
    background-color: gray;
}

input[su][type="checkbox"]:checked+span,
input[su][type="radio"]:checked+span {
    background-color: var(--Primary);
    color: var(--Primary);
}

input[su][type="checkbox"]+span:active,
input[su][type="checkbox"]:checked+span:active,
input[su][type="radio"]+span:active,
input[su][type="radio"]:checked+span:active {
    background-color: var(--Primary);
}

input[su][type="checkbox"]:disabled+span,
input[su][type="radio"]:disabled+span {
    border-color: lightgray;
    color: lightgray;
    background-color: lightgray;
    pointer-events: none;
}

input[su="switch"][type="checkbox"]+span {
    left: 0;
    border-radius: 1em;
    border-color: gray;
}

input[su="switch"][type="checkbox"]:checked+span {
    left: 1.5em;
    border-color: var(--Primary);
}

input[su="switch"][type="checkbox"]+span:after {
    content: "";
    position: absolute;
    display: block;
    margin-top: 50%;
    border-bottom: 2px solid lightgray;
    width: 1.4em;
    height: 0;
    transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
    margin-left: 0.8em;
}

input[su="switch"][type="checkbox"]:checked+span:after {
    border-bottom: 2px solid var(--Primary);
    margin: 0.4em 0 0 -1.5em;
    transform: none;
    width: 1.4em;
    height: 0;
}

input[type="range"][su~="star"] {
    cursor: pointer;
    width: calc(16px * 5);
    height: 16px;
    -webkit-appearance: none;
    background: linear-gradient(to right, var(--Primary), var(--Primary)), linear-gradient(to right, var(--Gray), var(--Gray));
    background-repeat: no-repeat;
    -webkit-mask-image: var(--star);
}

input[type="range"][su~="star"][value="1"] {
    background-size: calc(16px * 1) 16px, calc(16px * 5) 16px;
}

input[type="range"][su~="star"][value="2"] {
    background-size: calc(16px * 2) 16px, calc(16px * 5) 16px;
}

input[type="range"][su~="star"][value="3"] {
    background-size: calc(16px * 3) 16px, calc(16px * 5) 16px;
}

input[type="range"][su~="star"][value="4"] {
    background-size: calc(16px * 4) 16px, calc(16px * 5) 16px;
}

input[type="range"][su~="star"][value="5"] {
    background-size: calc(16px * 5) 16px, calc(16px * 5) 16px;
}

input[type="range"][su~="star"]::-webkit-slider-thumb {
    opacity: 0;
}

input[type="range"][su~="range"] {
    -webkit-appearance: none;
    outline: 0;
    border-radius: var(--x1);
    cursor: ew-resize;
    height: 4px;
    background: var(--Primary);
    margin: 8px;
}

input[type="range"][su~="range"]::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    border-radius: 50%;
    height: 8px;
}

input[type="range"][su~="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: var(--x2);
    width: var(--x2);
    margin-top: -5px;
    background: #ffffff;
    border-radius: 50%;
    border: 4px solid var(--Primary);
}

input[type="text"][su] {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: 1px solid gray;
    height: var(--x2);
    line-height: var(--x2);
}

input[type="file"][su] {
    width: 12em;
}

label[su-group] {
    border-radius: var(--rad);
    border: 1px solid var(--Gray);
    overflow: hidden;
    display: inline-block;
}

label[su-group] input {
    border: 0 !important;
    background: transparent;
    word-spacing: 0;
}

label[su-group] button {
    box-shadow: none;
}

 ::-webkit-input-placeholder {
    color: var(--Gray);
}

textarea[su] {
    resize: none;
}

label[su-group] textarea[su] {
    border: 0;
    display: block;
}

label[su-group] textarea[su]+span {
    display: block;
    float: right;
    clear: both;
    color: var(--Gray);
}

label[su-group~="warning"] {
    border-color: var(--Warning);
}

label[su-group~="info"] {
    border-color: var(--Info);
}

label[su-group~="danger"] {
    border-color: var(--Danger);
}

label[su-group~="success"] {
    border-color: var(--Success);
}